﻿namespace IOA.MES.DataAccess.VModel
{
    /// <summary>
    /// 等级颜色配置-颜色
    /// </summary>
    public class VColorSet : BaseVModel
    {
        private string _colorCode = string.Empty;
        private string _color = string.Empty;

        #region Public Property

        ///<Summary>
        /// 组件颜色
        ///</Summary>
        public Enum.ColorType ColorType { get; set; }

        ///<Summary>
        /// 组件颜色代码
        ///</Summary>
        public string ColorCode
        {
            get { return string.IsNullOrWhiteSpace(_colorCode) ? string.Empty : _colorCode; }
            set { _colorCode = value; }
        }

        ///<Summary>
        /// 颜色名称
        ///</Summary>
        public string Color
        {
            get { return string.IsNullOrWhiteSpace(_color) ? string.Empty : _color; }
            set { _color = value; }
        }

        ///<Summary>
        /// 颜色类型
        ///</Summary>
        public string CNColorType
        {
            get
            {
                return EnumConvert.ToDesc(this.ColorType);
            }
        }

        #endregion
    }
}
